using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace WPCoco.Tasks
{
    public class EaseBounceInOutFunction : EaseFunction
    {
        public override float Evaluate(float time)
        {
            float result = 0;
            if (time < 0.5)
            {
                time = time * 2;
                result = (1 - EaseHelper.Bounce(1 - time)) * 0.5f;
            }
            else
            {
                result = EaseHelper.Bounce(time * 2 - 1) * 0.5f + 0.5f;
            }
            return result;
        }
    }
}
